import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';

@Component({
  selector: 'app-user',
  templateUrl: './user.component.html',
  styleUrls: ['./user.component.scss']
})
export class UserComponent implements OnInit {

  constructor(private router: Router) { }
  userInfo = {
    username: 'zzz',
    age: 18,
    sex: '男',
    tel: 13666668888,
    interduce: 'This is a good man!'
  }
  isEditBasic: Boolean = false
  isEditSafe: Boolean = false
  isEditOther: Boolean = false
  isShow: Boolean = false
  ngOnInit() {
  }

  /** 编辑个人信息  */
  handlerClickEdit() {
    this.isEditBasic = !this.isEditBasic
  }

  /* 查看密码 */
  showPassword() {
    this.isShow = !this.isShow
  }

  /* 重置密码 */
  resetPassword() {
    this.router.navigateByUrl('/home/user/password')
  }
}
